/* clock.h */

/* For plotting a clock bar along the bottom.
   Clock units are at the rate of one every (30) frames; each unit is one pixel
   wide so a maximum of 320 is allowed
 */

#ifndef __clock_h
#define __clock_h

#include "DeskLib:Core.h"

/* Number of frames per 'tick' */
#define clock_SUBTICKS 30

/* Y coord of top of clock bar */
#define clock_TOP 230

/* Default time limit */
#define clock_DEFAULT_WIDTH 240

/* clock_RED_WIDTH leftmost pixels are red; this must be word-aligned */
#define clock_RED_WIDTH 16

/* Initialise clock start and end points */
void clock_init(int units);

/* Draw clock bar
   rowsize is as scrn_rowsize */
extern void clock_draw(int rowsize);
extern void clock_draw_double(int rowsize);

/* Start address and current width of bar (stored with m/code) */
extern void *clock_start; /* Dependent on screen bank */
extern int clock_width;
extern int clock_red_width;

/* Offset from start of screen bank to start of clock bar */
extern int clock_start_offset;

#endif
